package ezXpns.analysis;

import java.util.UUID;

/**
 * An aggregator combines a collection of data into one single piece of data
 * @author A0088827L
 *
 * @param <InT> Input type
 * @param <OutT> Output type
 */

//@author A0088827L
public interface Aggregator<InT, OutT> {
	/**
	 * Called when a new data is put into 
	 * @param id id of the item being added
	 * @param item the item being added
	 */
	public void addEntry(UUID id, InT item);
	
	/**
	 * Called when data is removed from the collection
	 * @param id id of the removed item
	 * @param item the item being removed
	 */
	public void removeEntry(UUID id, InT item);
	
	/**
	 * Called to retrieve the current aggregation result
	 * @return the current aggregation result
	 */
	public OutT getResult();
}
